package homework.work4;

public class Rectangle extends Shape{
    int a;
    int b;
    @Override
    public void getPerimeter() {
        System.out.println("perimeter= "+2*(a+b));
    }

    @Override
    public void getArea() {
        System.out.println("area= "+a*b);
    }

    //构造器

    public Rectangle(int a, int b) {
        this.a = a;
        this.b = b;
    }
}
